<!DOCTYPE html>
<html>

<head>
    <#include "/dk/admin/components/meta.html" />
    <title>蓝天运动 ${metaTitleSuffix!}</title>
    <#include "/dk/admin/components/stylesheets.html" />
</head>

<body>
    <div id='app'>
        <el-container>
            <#assign menuIndex="1-1" />
            <#include "/dk/admin/components/menu.html" />
            <el-container>
                <#include "/dk/admin/components/header.html" />
                <el-main>
                    <template>
                        <el-table :data="items" style="width: 100%">
                            <el-table-column prop="addTime" label="日期">
                            </el-table-column>
                            <el-table-column prop="name" label="姓名">
                            </el-table-column>
                            <el-table-column prop="mobile" label="电话">
                            </el-table-column>
                            <el-table-column  label="操作">
                                <template slot-scope="scope">
                                    <el-button size='small' @click=onDelete(scope.row) type='danger'>取消</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                        <#include '/components/page.html' />
                    </template>
                </el-main>
            </el-container>
        </el-container>
        <#include "/xhc/admin/components/footer.html" />
    </div>
    <script src="https://cdn.bootcss.com/vue/2.5.17/vue.min.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="https://cdn.bootcss.com/qs/6.5.2/qs.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/layer/2.3/layer.js"></script>
    <link href="https://cdn.bootcss.com/layer/2.3/skin/layer.css" rel="stylesheet">
    <script src="/components/utils.js"></script>
    <script src="/components/pageJs.js"></script>
    <script type="text/javascript">
    var vue = new Vue({
        el: '#app',
        data() {
            return {
                date: ['${startTime!}', '${endTime!}'],
                items: JSON.parse(`${items![]}`)
            }
        },
        mounted: function() {},
        methods: {
            onDelete(info) {
                this.$confirm('确定取消?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    var param = {
                        arrangeId: info.arrangeId,
                        userId: info.id
                    }
                    console.log(param)
                    axiosRequest(param, '/dk/admin/cancel', '')
                }).catch(() => {});
            },
        },
        filters: {
            fmt(date) {
                return date
            }
        }
    })
    </script>
    <script>
    // vue.tableData = ${items!};
    </script>
</body>

</html>